﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cards
{
    public class Deck
    {
        private readonly IList<Card> _cards;

        public Deck()
        {

        }

        public Card dealCard()
        {
            //TODO check that there are cards
            var card = _cards.First();
            _cards.RemoveAt(0);
            return card;
        }

        public Card getCard(int cardPosition)
        {
            //TODO check bounds for card position
            var card = _cards.ElementAt(cardPosition);
            _cards.RemoveAt(cardPosition);
            return card;
        }
    }
}
